/**
 * Project: push-center-biz-dal
 * 
 * File Created at 2014年10月9日
 * 
 * Copyright 2012 Greenline.com Corporation Limited.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * Greenline Company. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Greenline.com.
 */
package com.greenline.push.core.pushcenter;

import java.util.List;

import com.greenline.push.dal.pushcenter.dataobject.GroupAppDO;
import com.greenline.push.dal.query.GroupAppQuery;

/**
 * @Type GroupManager
 * @Desc
 * @author shuai.zuo
 * @date 2014年10月9日
 * @Version V1.0
 */
public interface GroupAppManager {
    /**
     * 新增
     * 
     * @param group
     * @return 新增数据的ID
     */
    Long insert(GroupAppDO group);

    /**
     * 根据ID获取
     * 
     * @param id
     * @return GroupAppDO
     */
    GroupAppDO getById(Long id);

    /**
     * 跟新
     * 
     * @param group
     * @return -1 表示更新失败；>0 表示更新成功
     */
    boolean update(GroupAppDO groupAppDO);

    /**
     * 分页查询
     * 
     * @param query
     * @return
     */
    GroupAppQuery listByQuery(GroupAppQuery query);

    /**
     * 删除
     * 
     * @param id
     * @return -1 表示更新失败；>0 表示更新成功
     */
    boolean delete(Long id);

    /**
     * 获取所有的appid
     * 
     * @param appId
     * @return
     */
    List<GroupAppDO> listByAppId(Long appId);
}
